package com.fary.web.multipart;

import com.fary.core.SpringException;

import javax.servlet.http.HttpServletRequest;

public interface MultipartResolver {

	/**
	 * 判断是否存在文件流
	 */
	boolean isMultipart(HttpServletRequest request);

	/**
	 * 解析http请求，并将请求封装到MultipartHttpServletRequest对象中，
	 */
	MultipartHttpServletRequest resolveMultipart(HttpServletRequest request) throws SpringException;

	/**
	 * 清理上传的资源
	 */
	void cleanupMultipart(MultipartHttpServletRequest request);

}